package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.StudentEvaluationMapper;
import com.lingyu.jsjx.domain.StudentEvaluation;
import com.lingyu.jsjx.service.IStudentEvaluationService;

/**
 * 学生评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class StudentEvaluationServiceImpl  extends ServiceImpl<StudentEvaluationMapper, StudentEvaluation> implements IStudentEvaluationService
{
    @Autowired
    private StudentEvaluationMapper studentEvaluationMapper;

    /**
     * 查询学生评价
     * 
     * @param studentEvalId 学生评价主键
     * @return 学生评价
     */
    @Override
    public StudentEvaluation selectStudentEvaluationByStudentEvalId(Long studentEvalId)
    {
        return studentEvaluationMapper.selectStudentEvaluationByStudentEvalId(studentEvalId);
    }

    /**
     * 查询学生评价列表
     * 
     * @param studentEvaluation 学生评价
     * @return 学生评价
     */
    @Override
    public List<StudentEvaluation> selectStudentEvaluationList(StudentEvaluation studentEvaluation)
    {
        return studentEvaluationMapper.selectStudentEvaluationList(studentEvaluation);
    }

    /**
     * 新增学生评价
     * 
     * @param studentEvaluation 学生评价
     * @return 结果
     */
    @Override
    public int insertStudentEvaluation(StudentEvaluation studentEvaluation)
    {
        return baseMapper.insert(studentEvaluation);
    }

    /**
     * 修改学生评价
     * 
     * @param studentEvaluation 学生评价
     * @return 结果
     */
    @Override
    public int updateStudentEvaluation(StudentEvaluation studentEvaluation)
    {

        return baseMapper.updateById(studentEvaluation);
    }

    /**
     * 批量删除学生评价
     * 
     * @param studentEvalIds 需要删除的学生评价主键
     * @return 结果
     */
    @Override
    public int deleteStudentEvaluationByStudentEvalIds(Long[] studentEvalIds)
    {
        return studentEvaluationMapper.deleteStudentEvaluationByStudentEvalIds(studentEvalIds);
    }

    /**
     * 删除学生评价信息
     * 
     * @param studentEvalId 学生评价主键
     * @return 结果
     */
    @Override
    public int deleteStudentEvaluationByStudentEvalId(Long studentEvalId)
    {
        return baseMapper.deleteById(studentEvalId);
    }
}
